<div style="height: 350px">
    @foreach($list as $vo)
    <div class="col-md-6" style="height: 100%;border: 1px solid #d8d8d8">
        <div id="line_chart_{{$vo['id']}}" style="width: 100%;height:100%;">加载中....</div>
    </div>
        <script>
            $(function () {
                var line_chart_{{$vo['id']}} = echarts.init(document.getElementById('line_chart_{{$vo['id']}}'), null, {renderer: 'canvas'});
                line_chart_{{$vo['id']}}.setOption({
                    title: {
                        text: '{{$vo['title']}}'
                    },
                    tooltip: {
                        trigger: 'axis'
                    },
                    legend: {
                        data: [
                            @foreach($vo['data'] as $legend)
                            "{{$legend['name']}}",
                            @endforeach
                        ]
                    },
                    grid: {
                        left: '3%',
                        right: '4%',
                        bottom: '3%',
                        containLabel: true
                    },
                    toolbox: {
                        feature: {
                            saveAsImage: {}
                        }
                    },
                    xAxis: {
                        type: 'category',
                        boundaryGap: false,
                        data: [@foreach($vo['years'] as $y)'{{$y}}年',@endforeach]
                    },
                    yAxis: {
                        type: 'value'
                    },
                    series: [
                        @foreach($vo['data'] as $vv)
                        {
                            name: '{{$vv['name']}}',
                            type: 'line',
                            stack: 'Total',
                            data: [{{$vv['data']}}]
                        },
                         @endforeach
                    ]
                });
            });
        </script>
    @endforeach
</div>
